<a href='https://github.com/angular/angular.js/edit/v1.4.x/docs/content/error/ngModel/datefmt.ngdoc?message=docs(error%2Fdatefmt)%3A%20describe%20your%20change...' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this Doc</a>


<h1>Error: ngModel:datefmt
  <div><span class='hint'>Model is not a date object</span></div>
</h1>

<div>
    <pre class="minerr-errmsg" error-display="Expected `{0}` to be a date">Expected `{0}` to be a date</pre>
</div>

<h2>Description</h2>
<div class="description">
  <p>All date-related inputs like <code>&lt;input type=&quot;date&quot;&gt;</code> require the model to be a <code>Date</code> object.
If the model is something else, this error will be thrown.
Angular does not set validation errors on the <code>&lt;input&gt;</code> in this case
as those errors are shown to the user, but the erroneous state was
caused by incorrect application logic and not by the user.</p>

</div>


